using System;
using System.Collections.Specialized;
using System.Web.Security;

namespace Be.Timvw.Framework.Web.Tests.Security.OneTimePasswordMembershipProvider
{
    public interface IMembershipProvider
    {
        bool EnablePasswordRetrieval { get; }
        bool EnablePasswordReset { get; }
        bool RequiresQuestionAndAnswer { get; }
        string ApplicationName { get; set; }
        int MaxInvalidPasswordAttempts { get; }
        int PasswordAttemptWindow { get; }
        bool RequiresUniqueEmail { get; }
        MembershipPasswordFormat PasswordFormat { get; }
        int MinRequiredPasswordLength { get; }
        int MinRequiredNonAlphanumericCharacters { get; }
        string PasswordStrengthRegularExpression { get; }
        void Initialize(string name, NameValueCollection config);
        MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, Object providerUserKey, out MembershipCreateStatus status);
        bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer);
        string GetPassword(string username, string answer);
        bool ChangePassword(string username, string oldPassword, string newPassword);
        string ResetPassword(string username, string answer);
        void UpdateUser(MembershipUser user);
        bool ValidateUser(string username, string password);
        bool UnlockUser(string userName);
        MembershipUser GetUser(Object providerUserKey, bool userIsOnline);
        MembershipUser GetUser(string username, bool userIsOnline);
        string GetUserNameByEmail(string email);
        bool DeleteUser(string username, bool deleteAllRelatedData);
        MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out Int32 totalRecords);
        int GetNumberOfUsersOnline();
        MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out Int32 totalRecords);
        MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out Int32 totalRecords);
    }
}